package com.nm.service;

import com.nm.commons.exception.SupperException;
import com.nm.orm.dao.pageParam.ArticleBackPageInput;
import com.nm.orm.dao.pageParam.ArticlePageInput;
import com.nm.orm.pojo.ArticleEntity;
import com.nm.orm.pojo.out.ArticleBackPageOutput;
import com.nm.orm.pojo.out.ArticleOutput;
import com.nm.service.page.PageEntity;

import java.util.List;

/**
 * Created by hewu on 2017/2/15 0015.
 */
public interface ArticleService extends BaseService<ArticleEntity, String> {

    /**
     * 查找所有
     *
     * @return
     * @throws SupperExcetion
     */
    List<ArticleEntity> findAll() throws SupperException;

    /**
     * 前台分页查询文章
     *
     * @param input
     * @return
     */
    PageEntity<ArticleOutput> pageQuery(ArticlePageInput input);

    /**
     * 后台分页查询
     * @param input
     * @return
     */
    PageEntity<ArticleBackPageOutput> backPageQuery(ArticleBackPageInput input);

}
